package com.example.demo.controller;

import com.example.demo.dto.Tool;
import com.example.demo.util.MapperUtil;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * @Author 胡方博
 * @Date 2024-08-03  下午3:58
 **/
@Controller
public class HelloController {
    @FXML
    private Label welcomeText;


    @FXML
    protected void onHelloButtonClick() {

        List<Tool> toolList=MapperUtil.mapperUtil.toolDao.getUserById(9);
        toolList.forEach((tool)->{
            welcomeText.setText("!"+tool.getName());
        });

    }

}
